/**
 * @author 陈泰来
 * @version V1.0
 * @Project echo-java-base
 * @Title 手机生产代工厂
 * @Description *
 * @Package designmodel.factorymodel.simpleFac.factory
 * @date 2020/10/27 1:12 下午
 * @Copyright:学如逆水行舟，不进则退 .
 */
package designmodel.factorymodel.simpleFac.factory;

import designmodel.factorymodel.simpleFac.model.concret.IPhone;
import designmodel.factorymodel.simpleFac.model.concret.XiaomiPhone;
import designmodel.factorymodel.simpleFac.model.Phone;

public class PhoneFactory {

    public Phone makePhone(String phoneType) {

        switch (phoneType) {
            case "xiaomi":
                return new XiaomiPhone();
            case "apple":
                return new IPhone();
            default:
                break;
        }
        System.out.println("先指定手机类型再生产");
        return null;
    }

}
